package com.pomelo.tiku.views;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.pomelo.tiku.R;

/**
 * @author liuxiangwang
 * @date .
 */
public class CommonToast {
    public CommonToast() {

    }
    public static void  show(Context context,String text) {
        View view = LayoutInflater.from(context).inflate(R.layout.layout_toast, null);
        TextView tv = view.findViewById(R.id.tvToast);
        tv.setText(text);
        Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
        toast.setView(view);
        toast.show();
    }
}
